#pragma once
#include <list>
#include <thread>
#include <any>
#include <iostream>
#include <string>
#include "taos.h"
class DB_TdEngine
{
    TAOS *taos;
    TAOS_RES* queryDB(TAOS *taos, const char *command);
public:
    DB_TdEngine(std::string ip, std::string user, std::string passwd, std::string db);
    ~DB_TdEngine(){
        if(taos) {
            taos_close(taos);
            taos_cleanup();
        }
    }

    std::list<std::any> query(std::string sql);
    void exec(std::string sql);
};